//
//  XuanZeShiJianView.m
//  SanYiTeaching
//
//  Created by 李文强 on 2019/6/3.
//  Copyright © 2019 SanYi. All rights reserved.
//

#import "XuanZeShiJianView.h"

@implementation XuanZeShiJianView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame{
    if ([super initWithFrame:frame]) {
        [self initSubView];
    }
    return self;
}
- (void)initSubView{
    self.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.jieZhiRiQiLabel];
    [self addSubview:self.kaiShiTimeView];
    [self addSubview:self.jierShuTimeView];
    
    [_jieZhiRiQiLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.mas_centerX).offset(-80);
        make.width.equalTo(@70);
        make.height.equalTo(@40);
        make.centerY.equalTo(self.mas_centerY);
    }];
    [_kaiShiTimeView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self->_jieZhiRiQiLabel.mas_right);
        make.width.equalTo(@110);
        make.height.equalTo(@40);
        make.centerY.equalTo(self.mas_centerY);
    }];
    [_jierShuTimeView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self->_kaiShiTimeView.mas_right).offset(20);
        make.width.equalTo(@110);
        make.height.equalTo(@40);
        make.centerY.equalTo(self.mas_centerY);
    }];
}
//截止日期
- (UILabel *)jieZhiRiQiLabel{
    if (!_jieZhiRiQiLabel) {
        UILabel *label = [[UILabel alloc]init];
        label.text  = @"截止日期:";
        label.font = [UIFont systemFontOfSize:14];
        label.textColor = TITLECOLOR;
        label.textAlignment = 0;
        _jieZhiRiQiLabel = label;
}
    return _jieZhiRiQiLabel;
}
- (ZXFDCSelectedView *)kaiShiTimeView{
    if (!_kaiShiTimeView) {
        ZXFDCSelectedView *view = [[ZXFDCSelectedView alloc]initWithFrame:CGRectMake(0, 0, 0, 0)];
        view.layer.cornerRadius = 2;
        view.layer.borderColor = [UIColorChange colorwithHexString:@"#999999"].CGColor;
        view.layer.borderWidth = 1;
        view.nameLabel.text = @"开始日期";
        
        _kaiShiTimeView = view;
    }
    return _kaiShiTimeView;
}

- (ZXFDCSelectedView *)jierShuTimeView{
    if (!_jierShuTimeView) {
        ZXFDCSelectedView *view = [[ZXFDCSelectedView alloc]initWithFrame:CGRectMake(0, 0, 0, 0)];
        view.layer.cornerRadius = 2;
        view.layer.borderColor = [UIColorChange colorwithHexString:@"#999999"].CGColor;
        view.layer.borderWidth = 1;
        view.nameLabel.text = @"结束日期";
        
        _jierShuTimeView = view;
    }
    return _jierShuTimeView;
}

@end
